home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / bbsutil / logmgr16.zip / LOGMGR.DOC < prev    next >
Text File  |  1991-07-10  |  7KB  |  189 lines

  1. Syntax:   logmgr logfile logpatt arcpatt -a "arc cmd" [-k n1] [-s n2] [-l]
  2.                  [-m] [-v] [-w]
  3.  
  4. Function: maintains a logfile directory.
  5.  
  6. Arguments:
  7.      
  8.      logfile
  9.           is the name of the currently existing log file.
  10.  
  11.      logpatt
  12.           specifies a naming pattern for the logfile to be renamed to.
  13.  
  14.      arcpatt
  15.           specifies an archive filename pattern to be used for storing
  16.           old logfiles.
  17.  
  18.      "arc cmd"
  19.           specifies the command and initial arguments for archiving
  20.           old logs. Note that quotes are required if this argument
  21.           contains any spaces.
  22.  
  23.      -k n1
  24.           specifies how many old log to keep. Old logs in
  25.           excess of this count will be deleted. A specification of zero
  26.           (the default) means that no old logs will be deleted. Note:
  27.           this count includes the just-renamed log.
  28.  
  29.      -s n2
  30.           specifies how many old archives to keep. Old ones in
  31.           excess of this count will be deleted. A specification of zero
  32.           means that no old archives will be deleted. The default is 2.
  33.  
  34.      -l
  35.           log all logmgr actions to the newly-created logfile.
  36.  
  37.     -m
  38.           create new archive files monthly (the default).
  39.  
  40.     -v 
  41.           log all logmgr actions to the stdout (usually the console
  42.           but can be redirected).
  43.  
  44.     -w
  45.           create new archive files weekly (the default is monthly).
  46.  
  47.  
  48. Note:
  49.  
  50.      The "/" character may be used in place of "-" for those who prefer
  51.      this style (.e.g /k 2).
  52.  
  53.  
  54. Warning:
  55.  
  56.     If you change from monthly to weekly archives using the same arcpattern
  57.     you CANNOT change back until the beginning of the next year. The logmgr
  58.     has no way of determining whether, for example, log-1290.arc refers
  59.     to the archive for week 12 or for December except by the frequency
  60.     specified in the command line (either explicitly or implicitly). Changing
  61.     from monthly to weekly causes no problems, except for a gap in the
  62.     numbering of the archives.
  63.  
  64. Description:
  65.  
  66. The logmgr command functions as follows:
  67.  
  68.      1) The current logfile is renamed to a name created from the logpattern
  69.         argument. Currently this is limited to a Julian-date specification,
  70.         e.g. fd-log.###, where the ### is translated to the Julian day number.
  71.         If this file already exists then logmgr has already been run today
  72.         and will exit.
  73.  
  74.      2) All other (excluding today's) old logs matching the logpattern
  75.         are archived using the "arc cmd" string into an archive file derived
  76.         from the arcpattern command. Currently this is limited to a month/year
  77.         specification, e.g., log-####, where the #### will be translated
  78.         to the MMYY digits of the month and year, for monthly archives (the
  79.         default), or WWYY digits of the week and year for weekly archives
  80.         (specified via the -w option).
  81.  
  82.      3) All archives (including, potentially, the current one) matching the
  83.         arcpatt(.*) in excess of the specified count will be deleted.
  84.  
  85.      4) All old logs matching the logpatt in excess of the specified count
  86.         will be deleted.
  87.  
  88.  
  89. Example:
  90.  
  91. Today is December 16, 1990, i.e. day 350 of the year. Currently existing
  92. archive files are log-1189.arc log-1289.arc, log-0190 thru log-1190 (the
  93. logmgr has not been run recently), together with old log files fd-log.345
  94. thru fd-log.349.
  95.  
  96. The command line
  97.  
  98.      logmgr fd.log fd-log.### log-#### -a "arc m" -s 10 -l -v
  99.  
  100. results in the following actions:
  101.  
  102.      1) fd.log is renamed fd-log.350
  103.  
  104.      2) the command line
  105.            arc m log-1290 fd-log.345 fd-log.346 fd-log.347 fd-log.348 fd-log.349
  106.         is executed
  107.  
  108.      3) the old archive files log-1189.arc, log-1289.arc, log-0190.arc and
  109.         log-0290.arc are deleted, leaving 10 archive files (log-0390.arc
  110.         thru log-1290.arc).
  111.  
  112.      4) all these actions are reported in a newly-created fd.log.
  113.  
  114.      5) all these actions are reported on stdout.
  115.  
  116. Limitations:
  117.  
  118. Currently only the Julian date pattern for old logs and the month/year or
  119. week/year patterns for log archives are supported. 
  120.  
  121. Because the extension of the log archive is dependent on the particular
  122. archiving command, arcpatt.* is used to match which files to consider
  123. eligible for deletion. The existence of additional files matching this
  124. pattern (e.g. in the above example log-1289.bak) will cause potential
  125. problems.
  126.  
  127. The algorithm used to decide which log archives to delete is based solely
  128. upon a sort of the log archive file names. This is done in order to avoid
  129. the potential problems resulting from manual updating of the files if a
  130. date/time modified sort were used.
  131.  
  132.  
  133. Implementation:
  134.  
  135. This program was written in C++ and compiled using Borland C++ version 2.
  136.  
  137. Note:
  138.  
  139. The logmgr will swap itself out to whichever is available of extended or
  140. expanded memory or a temporary disk file while executing the archival
  141. command.
  142.  
  143. Version:
  144.  
  145. This document describes logmgr version 1.60, July 10, 1991.
  146.  
  147.  
  148.                     Copyright (C), Jupiter Software, 1990, 1991.
  149.                            All Rights Reserved
  150.  
  151.  
  152.  ╔═══════════════════════════════ DISCLAIMER ═════════════════════════════════╗
  153.  ║ The author makes no warranties expressed or implied as to the  quality  or ║
  154.  ║ performance of this program.    The author will not be held liable for any ║
  155.  ║ direct, indirect,  incidental, or consequential damages resulting from the ║
  156.  ║ use of this program.  Your use of the program constitutes  your  agreement ║
  157.  ║ to this disclaimer and your  release  of  the  author  from  any  form  of ║
  158.  ║ liability or litigation.                                                   ║
  159.  ╚════════════════════════════════════════════════════════════════════════════╝
  160.  
  161.      $25 shareware contribution is requested for the use of the program.
  162.  
  163.      Users of this program are invited to send contributions to help the
  164.      author maintain it and to develop other, similarly useful, programs.
  165.      Please send contributions, comments, suggestions, etc., to:
  166.  
  167.                         Jupiter Software,
  168.                         587, Langvista Drive,
  169.                         Victoria
  170.                         British Columbia
  171.                         V9B 5N3
  172.                         Canada
  173.  
  174.                         IMEx: 89:688/21
  175.                         InterNet: Deryk.Barker@f21.n688.z89.imex.org
  176.  
  177. * This program is distributed for personal, private, non-commercial use.
  178. * The author retains the sole right to sell the program.
  179. * The author grants users the right to copy and distribute the program within
  180.   the following constraints:
  181.     * All program files remain unaltered and are distributed en masse.
  182.     * No attempt is made to sell the program, or to make money from it or any
  183.       modified version of it.
  184.     * The program is not bundled with any other hardware/software transactions.
  185.     * Commercial use of the program without a license is prohibited.
  186.     * Corporations and other institutions which desire commercial use of the
  187.       program should contact the author for a site licensing agreement.
  188.  
  189.